const express = require('express');
const router = express.Router();
const sys_user = require('../../../models/sys_user')


router.post('/sys/user/paging', async (req, res) => {
    const { current, size ,params={realName:'',userName:''}} = req.body 

    const records=await sys_user.findPaging(params)
    
    const total=await sys_user.countUser()
    return res.json({
        msg: "操作成功！",
        code: 0,
        data: {
            records: records,
            total: total,
            size: size,
            current: current,
            orders: [],
            optimizeCountSql: true,
            hitCount: false,
            searchCount: true,
            pages: Math.ceil(total / size)
        },
        success: true
    });
})



module.exports = router;

